커서 (소프트웨어)
- 2024-09-12 (modified: 2025-07-13)
- 별칭: Cursor, 커서
2023년 3월 14일에 출시된 Visual Studio Code 기반의 IDE. 커서 예측 기능, 다중 제안, 컴포저 등의 기능을 제공.
Built to make you extraordinarily productive, Cursor is the best way to code with AI.1
메모
Cursor를 30분 정도 평가해보고 2021년 7월부터 써왔던 GitHub Copilot의 구독을 바로 취소했다. 가격은 두 배(20)지만 아무 망설임이 없다. 커서 예측도 좋고(내가 가고 싶은 곳으로 한번에 이동), 여러 줄 수정(한 파일 내의 여러 위치에 ghost text가 나오고 탭을 누르면 한번에 완성)도 좋다.
사용자가 곧 편집할 가능성이 높은 지점들을 예측하는 모델을 만든 게 아닐까 추측해본다. 가장 가능성이 높은 지점으로 이동하는 게 Cursor prediction 기능일테고, 가능성이 높은 지점들에 대해 한 번에 수정 제안들을 생성하는 게 Multi-line edits 기능이 아닐까 싶음. 아무튼 잘 만들었다.
Writing Cursor Rules
공식 문서
docs.cursor.com/context/rules-for-ai
- Reference files: Use
@file
in your project rules to include them as context when the rule is applied.
기타
It’s key to understand that these rules are not appended to the system prompt but instead are referred to as named sets of instructions. Your mindset should be writing rules as encyclopedia articles rather than commands.2
- Do not provide an identity in the rule like “You are a senior frontend engineer that is an expert in typescript”
- Do not (or avoid) try to override system prompt instructions or attempt to prompt the apply model using “don’t add comments”, “ask me questions before coding”, and “don’t delete code that I didn’t ask you about”. These conflict directly with the internals breaking tool-use and confuse the agent.
- Do not (or avoid) tell it what not to do. LLMs are best at following positive commands “For this, do this” rather than just a list of restrictions. You see this in Cursor’s own prompts.
- Do spend time writing highly salient rule names and descriptions. It’s key that the agent, with minimal knowledge of your codebase, can intuitively know when a rule is applicable to use its fetch_rules(…) tool. As if you were building a handcrafted reverse index of documentation, you should at times have duplicate rules with different names and descriptions to improve the fetch rate. Try to keep descriptions dense and not overly verbose.
- Do write your rules like encyclopedia pages for your modules or common code changes. Like Wikipedia, linking key terms (using mdc link syntax) to code files provide a huge boost to the agent when determining the right context needed for a change. This at times also means avoiding step by step instructions (focus on “what” and not “how”) unless absolutely necessary to avoid overfitting the agent to a specific type of change.
- Do use Cursor itself to draft your rules. LLMs are great at writing content for other LLMs. If you are unsure how to format your documentation or encode context, do “@folder/ generate a markdown file that describes the key file paths and definitions for commonly expected changes”.
- Do consider having a ton of rules as an anti-pattern. It’s counterintuitive but while rules are critical for getting AI IDEs to work on large codebases, they are also indicative of a non-AI-friendly codebase. I wrote more on this in AI-powered Software Engineering, but the ideal codebase-of-the-future is intuitive enough that coding agents only need built-in tools to work perfectly every time.
See also
- TabNine: (아마도) 최초의 생성 AI 기반 코드 자동완성 툴
- GitHub Copilot: AI 지원 프로그래밍 서비스.